#include <iostream>

using namespace std;

// 使用命令行工具查看 类的对象模型
// cl /d1 reportSingleClassLayoutPerson .\main.cpp
class Animal {
public:
	int age = 80;
	int getAgeR() {
		return ageR;
	}
private:
	int ageR = 99;
};
class Person: public Animal {
public:
	int name;
	int age;
	int getAgeR(int) {
		return age + 10;
	}
};

void test() {
	Person p;
	p.age = 10;
	p.name = 17;
	cout << "p.age is " << p.age << endl;
	cout << "Base p.age is " << p.Animal::age << endl;

	cout << "p.getAge is " << p.getAgeR(10) << endl;
	cout << "Base p.getAge is " << p.Animal::getAgeR() << endl;
	
}
int main() {
	test();
	return 0;
}